<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>开展监管工作情况</title>
    <script src="../../js/header.js"></script>
    <style type="text/css">
        html, body, #app {
            padding: 0px;
            margin: 0px;
        }

        #app {
            border-top: 3px solid #0D9AFF;
            background: #FFFFFF;
            box-shadow: 0px 2px 4px 0 rgba(200, 200, 200, 0.50);
            padding: 25px;
            background: url(../../images/bg.png) no-repeat;
            background-size: cover;
            /*background-attachment: fixed;*/
        }

        .tab-title {
            font-size: 16px;
            font-weight: bold;
            border-left: 4px solid #0D9AFF;
            font-family: PingFangSC-Medium;
            padding-left: 10px;
            margin-bottom: 20px;
        }

        .pagination {
            text-align: center;
            margin-top: 30px;
        }

        .el-dialog__footer {
            padding: 10px 20px 20px;
            text-align: center;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
        }

        .el-dialog__body {
            color: rgb(96, 98, 102);
            font-size: 14px;
            word-break: break-all;
            padding: 0px 20px;
        }

        .el-input__inner {
            -webkit-appearance: none;
            background-color: #FFF;
            background-image: none;
            border-radius: 4px;
            border: 1px solid #DCDFE6;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            color: #606266;
            display: inline-block;
            font-size: inherit;
            height: 30px;
            line-height: 30px;
            outline: 0;
            padding: 0 15px;
            -webkit-transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
            transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
            width: 100%;
        }
    </style>
</head>

<body>
<div v-cloak id="app">
    <!--待办-->
    <!--审定弹窗-->
    <div v-if="linkStatus=='1'">
        <el-form :model="checkcommonproject" :rules="rules" ref="checkcommonproject" label-width="140px">
            <div v-for="(item,index) in checkcommonproject.supervisionChildren">
                <!--建设工程概况-->
                <el-row>
                    <el-col :span="4" class="tab-title">
                        	建设工程概况
                    </el-col>
                </el-row>
                <!--第一行-->
                <el-row>
                    <!--第一列-->
                    <el-col :span="10" v-if="supType == '4'">
                        <el-form-item label="安评单位名称:" :prop="'supervisionChildren.'+index+'.recordProjectName'" :rules="rules.recordProjectName" label-width="110px">
                            <el-input v-model="item.recordProjectName" placeholder=""
                                      style="width: 500px;" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="10" v-if="supType == '0' || supType == '1' || supType == '2'  || supType == '3'">
                        <el-form-item label="监管项目名称:"  :prop="'supervisionChildren.'+index+'.recordProjectName'" :rules="rules.recordProjectName" label-width="110px">
                            <el-input v-model="item.recordProjectName" placeholder=""
                                      style="width: 500px;" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="10" v-if="supType == '5' || supType == '6'">
                        <el-form-item label="建设项目名称:" :prop="'supervisionChildren.'+index+'.recordProjectName'" :rules="rules.recordProjectName" label-width="110px">
                            <el-input v-model="item.recordProjectName" placeholder=""
                                      style="width: 500px;" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <!--第二列-->
                    <el-col :span="9" v-if="supType == '5' || supType == '6'">
                        <el-form-item label="建设类别:" :prop="'supervisionChildren.'+index+'.recordProjectType'" :rules="rules.recordProjectType" label-width="110px">
                            <el-select v-model="item.recordProjectType" placeholder="请选择项目类别"
                                       style="width: 300px;" disabled>
                                <el-option label="工业民用建筑" value="0"></el-option>
                                <el-option label="基础设施" value="1"></el-option>
                                <el-option label="能源" value="2"></el-option>
                                <el-option label="水利" value="3"></el-option>
                                <el-option label="严重次生灾害工程" value="4"></el-option>
                                <el-option label="其它" value="5"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="9" v-if="supType == '0'|| supType == '1'">
                        <el-form-item label="用地类型:" :prop="'supervisionChildren.'+index+'.recordLandType'" :rules="rules.recordLandType" label-width="110px">
                            <el-select v-model="item.recordLandType"  placeholder="请选择项目类别"
                                       style="width: 300px;" disabled>
                                <el-option label="涉核设施" value="0"></el-option>
								<el-option label="国家水电工程" value="1"></el-option>
								<el-option label="特殊设防类工程" value="2"></el-option>
								<el-option label="严重次生灾害工程" value="3"></el-option>
								<el-option label="省级重大建设工程" value="4"></el-option>
								<el-option label="重要基础设施" value="5"></el-option>
								<el-option label="其他" value="6"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="9" v-if="supType == '2'|| supType == '3'">
                        <el-form-item label="工程类别:" :prop="'supervisionChildren.'+index+'.recordProjectType'" :rules="rules.recordProjectType" label-width="110px">
							<el-form-item prop="">
								<el-select  v-model="item.recordProjectType" style="width: 300px;" disabled>
									<el-option label="涉核设施" value="0"></el-option>
									<el-option label="国家水电工程" value="1"></el-option>
									<el-option label="特殊设防类工程" value="2"></el-option>
									<el-option label="严重次生灾害工程" value="3"></el-option>
									<el-option label="省级重大建设工程" value="4"></el-option>
									<el-option label="重要基础设施" value="5"></el-option>
									<el-option label="其他" value="6"></el-option>
								</el-select>
							</el-form-item>
						</el-form-item>
                    </el-col>
                    <el-col :span="9" v-if="supType == '4'">
                        <el-form-item label="单位性质:"  label-width="110px">
							<el-select  v-model="item.syUnitType" placeholder="请选择" ref="syUnitType" disabled>							
								<el-option label="事业" value="事业"></el-option>
								<el-option label="企业" value="企业"></el-option>
							</el-select>
	
							<el-select  v-model="item.qyUnitType" placeholder="请选择" ref="qyUnitType" disabled>
								
							</el-select>
						</el-form-item>
                    </el-col>
                </el-row>
                <!--第二行-->
                <el-row>
                    <!--第一列-->
                    <el-col :span="10" v-if="supType == '0' || supType == '1' || supType == '2'  || supType == '3'">
                        <el-form-item label="项目地址:" v-model="item.recordProjectAddress" :prop="'supervisionChildren.'+index+'.recordProjectAddress'" :rules="rules.recordProjectAddress"
                                      label-width="110px">
	                        <span v-for="(items,indexs) in item.recordProjectAddress">
	                            <el-select v-model="items.provinceValue" placeholder="请选择省" @change="chooseProvince"
	                                       style="width: 150px;" disabled>
	                                <el-option
	                                        v-for="item in provinceData"
	                                        :key="item.code"
	                                        :label="item.name"
	                                        :value="item.name">
	                                </el-option>
	                            </el-select>
	                            <span style="color: #C0CCDA;;">—</span>
	                            <el-select v-model="items.cityValue" placeholder="请选择市" @change="chooseCity"
	                                       style="width: 150px;" disabled>
	                                <el-option
	                                        v-for="item in cityData"
	                                        :key="item.code"
	                                        :label="item.name"
	                                        :value="item.name">
	                                </el-option>
	                            </el-select>
	                            <span style="color: #C0CCDA;;">—</span>
	                            <el-select v-model="items.areaValue" @change="chooseArea" placeholder="请选择区、县"
	                                       style="width: 150px;" disabled>
	                                <el-option
	                                        v-for="item in areaData"
	                                        :key="item.code"
	                                        :label="item.name"
	                                        :value="item.name">
	                                </el-option>
	                            </el-select>
	                        </span>
                        </el-form-item>
                        
                    </el-col>
                    <el-col :span="10" v-show="supType == '4'">
                        <el-form-item label="注册地址:"  :prop="'supervisionChildren.'+index+'.recordProjectAddress'" :rules="rules.recordProjectAddress" label-width="110px">
	                        <el-input v-model="item.recordProjectAddress" placeholder="" style="width: 500px;" disabled></el-input>
                        </el-form-item>	                        
                    </el-col>
                    <el-col :span="10" v-show="supType == '5' || supType == '6'">
                        <el-form-item label="项目地址:" v-model="item.recordProjectAddress" :prop="'supervisionChildren.'+index+'.recordProjectAddress'" :rules="rules.recordProjectAddress"
                                      label-width="110px">
                            <span v-for="(items,indexs) in item.recordProjectAddress">
	                            <el-select v-model="items.provinceValue" placeholder="请选择省" @change="chooseProvince"
	                                       style="width: 150px;" disabled>
	                                <el-option
	                                        v-for="item in provinceData"
	                                        :key="item.code"
	                                        :label="item.name"
	                                        :value="item.name">
	                                </el-option>
	                            </el-select>
	                            <span style="color: #C0CCDA;;">—</span>
	                            <el-select v-model="items.cityValue" placeholder="请选择市" @change="chooseCity"
	                                       style="width: 150px;" disabled>
	                                <el-option
	                                        v-for="item in cityData"
	                                        :key="item.code"
	                                        :label="item.name"
	                                        :value="item.name">
	                                </el-option>
	                            </el-select>
	                            <span style="color: #C0CCDA;;">—</span>
	                            <el-select v-model="items.areaValue" @change="chooseArea" placeholder="请选择区、县"
	                                       style="width: 150px;" disabled>
	                                <el-option
	                                        v-for="item in areaData"
	                                        :key="item.code"
	                                        :label="item.name"
	                                        :value="item.name">
	                                </el-option>
	                            </el-select>
                            </span>
                        </el-form-item>
                	</el-col>
                    <el-col :span="9">
		                <el-form-item label="监管类别:" prop="supervision.suType" label-width="110px">
		                    <el-select v-model="checkcommonproject.supervision.suType" placeholder="请选择监管类别" style="width: 300px;" @change="chooseSutype" disabled>
		                        <el-option label="安评工作成果落实(全覆盖监管)" value="3"></el-option>
		                        <el-option label="安评工作成果落实(随机监管)" value="2"></el-option>
		                        <el-option label="区域地震安全性评估成果落实" value="0"></el-option>
		                        <el-option label="地震小区划工作成果落实" value="1"></el-option>
		                        <el-option label="对安评单位的监管" value="4"></el-option>
		                        <el-option label="设防强制性标准的落实" value="5"></el-option>
		                        <el-option label="行政执法行为监管结果落实" value="6"></el-option>
		                    </el-select>
		                </el-form-item>
		            </el-col>	            
                </el-row>
                <el-row>
                    <el-col :span="10">
                        <el-form-item label="监管日期:" :prop="'supervisionChildren.'+index+'.suTime'" :rules="rules.suTime" label-width="110px">
                            <el-date-picker
                            		disabled
                            		type="date"
                                    v-model="item.suTime"	                                    
                                    value-format="yyyy-MM-dd"
                                    placeholder="选择监管日期">
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                    <el-col :span="9">
                        <el-form-item label="监管结果:" :prop="'supervisionChildren.'+index+'.suResult'" :rules="rules.suResult" label-width="110px">
                            <el-select v-model="item.suResult" placeholder="请选择监管结果" style="width: 300px;" disabled>
                                <el-option label="符合要求" value="0"></el-option>
                                <el-option label="责令整改" value="1"></el-option>
                                <el-option label="处罚" value="2"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="监管情况说明:" :prop="'supervisionChildren.'+index+'.suExplain'" :rules="rules.suExplain" label-width="110px">
                            <el-input
                            		disabled
                                    type="textarea"
                                    :autosize="{ minRows: 8, maxRows: 8}"
                                    placeholder=""
                                    v-model="item.suExplain">
                            </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
            </div>

            <!--项目填报信息-->
            <el-row>
                <el-col :span="4" class="tab-title">
                    项目填报信息
                </el-col>
            </el-row>
            <el-row>
            	<el-col :span="8">
                    <el-form-item label="监管工作名称:" prop="supervision.projectName" :rules="rules.projectName" label-width="110px">
                        <el-input v-model="checkcommonproject.supervision.projectName" placeholder="请输入监管工作名称" disabled></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="5">
                    <el-form-item label="填报日期:" prop="supervision.suCreateTime" :rules="rules.suCreateTime" label-width="110px">
                        <el-date-picker
                        		disabled
                                v-model="checkcommonproject.supervision.suCreateTime"
                                type="date"
                                value-format="yyyy-MM-dd"
                                placeholder="选择填报日期">
                        </el-date-picker>
                    </el-form-item>
                </el-col>
                <el-col :span="5">
                    <el-form-item label="填报人员:" prop="supervision.suCreateUser" :rules="rules.suCreateUser" label-width="110px">
                        <el-input v-model="checkcommonproject.supervision.suCreateUser" placeholder="请输入填报人员" disabled></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="6">
                    <el-form-item label="填报部门:" prop="supervision.suCreateDepartment" :rules="rules.suCreateDepartment" label-width="110px">
                        <el-input v-model="checkcommonproject.supervision.suCreateDepartment" placeholder="请输入填报部门" disabled></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-form-item label="备注:" prop="" label-width="110px">
                        <el-input
                        		disabled
                                type="textarea"
                                :autosize="{ minRows: 8, maxRows: 8}"
                                placeholder=""
                                v-model="checkcommonproject.supervision.suRemark">
                        </el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <!--审定信息-->
            <el-row>
                <el-col :span="4" class="tab-title">审定信息</el-col>
            </el-row>
            <el-row>
                <el-col :span="6">
                    <el-form-item label="审定人员:" prop="supervision.checkUser" :rules="rules.checkUser" label-width="110px">
                        <el-input v-model="checkcommonproject.supervision.checkUser" placeholder=""></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="6">
                    <el-form-item label="审定人员机构:" prop="supervision.checkOrg" :rules="rules.checkOrg">
                        <el-input v-model="checkcommonproject.supervision.checkOrg" placeholder=""></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="6">
                    <el-form-item label="审定结果:" prop="supervision.checkResult" :rules="rules.checkResult" label-width="110px">
                        <el-select v-model="checkcommonproject.supervision.checkResult" placeholder="请选择">
                            <el-option label="不同意" value="0"></el-option>
                            <el-option label="同意" value="1"></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-form-item label="审定意见:" prop="supervision.checkView" :rules="rules.checkView" label-width="110px">
                        <el-input
                                type="textarea"
                                :autosize="{ minRows: 8, maxRows: 8}"
                                placeholder="请输入内容"
                                v-model="checkcommonproject.supervision.checkView">
                        </el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <!--操作按钮-->
            <el-row>
                <el-col :span="22">
                    <div style="float:right;">
                        <el-button type="primary" size="small" style="width: 60px;height: 30px;"
                                   @click="checkonSubmit('checkcommonproject');">审定
                        </el-button>
                        <el-button type="info" size="small" style="width: 60px;height: 30px;"
                                   @click="resetForm('checkcommonproject');checkCancel()">关闭
                        </el-button>
                    </div>
                </el-col>
            </el-row>
        </el-form>

    </div>

    <!--已办-->
    <!--查看弹窗-->
    <div v-if="linkStatus=='2'||linkStatus=='3'">
        <el-form :model="viewcommonproject" :rules="rules" ref="viewcommonproject" label-width="140px">
            <div v-for="(item,index) in viewcommonproject.supervisionChildren">
                <!--建设工程概况-->
                <el-row>
                    <el-col :span="4" class="tab-title">
                        	建设工程概况
                    </el-col>
                </el-row>
                <!--第一行-->
                <el-row>
                    <!--第一列-->
                    <el-col :span="10" v-if="supType == '4'">
                        <el-form-item label="安评单位名称:" :prop="'supervisionChildren.'+index+'.recordProjectName'" :rules="rules.recordProjectName" label-width="110px">
                            <el-input v-model="item.recordProjectName" placeholder=""
                                      style="width: 500px;" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="10" v-if="supType == '0' || supType == '1' || supType == '2'  || supType == '3'">
                        <el-form-item label="监管项目名称:"  :prop="'supervisionChildren.'+index+'.recordProjectName'" :rules="rules.recordProjectName" label-width="110px">
                            <el-input v-model="item.recordProjectName" placeholder=""
                                      style="width: 500px;" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="10" v-if="supType == '5' || supType == '6'">
                        <el-form-item label="建设项目名称:" :prop="'supervisionChildren.'+index+'.recordProjectName'" :rules="rules.recordProjectName" label-width="110px">
                            <el-input v-model="item.recordProjectName" placeholder=""
                                      style="width: 500px;" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <!--第二列-->
                    <el-col :span="9" v-if="supType == '5' || supType == '6'">
                        <el-form-item label="建设类别:" :prop="'supervisionChildren.'+index+'.recordProjectType'" :rules="rules.recordProjectType" label-width="110px">
                            <el-select v-model="item.recordProjectType" placeholder="请选择项目类别"
                                       style="width: 300px;" disabled>
                                <el-option label="工业民用建筑" value="0"></el-option>
                                <el-option label="基础设施" value="1"></el-option>
                                <el-option label="能源" value="2"></el-option>
                                <el-option label="水利" value="3"></el-option>
                                <el-option label="严重次生灾害工程" value="4"></el-option>
                                <el-option label="其它" value="5"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="9" v-if="supType == '0'|| supType == '1'">
                        <el-form-item label="用地类型:" :prop="'supervisionChildren.'+index+'.recordLandType'" :rules="rules.recordLandType" label-width="110px">
                            <el-select v-model="item.recordLandType"  placeholder="请选择项目类别"
                                       style="width: 300px;" disabled>
                                <el-option label="涉核设施" value="0"></el-option>
								<el-option label="国家水电工程" value="1"></el-option>
								<el-option label="特殊设防类工程" value="2"></el-option>
								<el-option label="严重次生灾害工程" value="3"></el-option>
								<el-option label="省级重大建设工程" value="4"></el-option>
								<el-option label="重要基础设施" value="5"></el-option>
								<el-option label="其他" value="6"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="9" v-if="supType == '2'|| supType == '3'">
                        <el-form-item label="工程类别:" :prop="'supervisionChildren.'+index+'.recordProjectType'" :rules="rules.recordProjectType" label-width="110px">
							<el-form-item prop="">
								<el-select  v-model="item.recordProjectType" style="width: 300px;" disabled>
									<el-option label="涉核设施" value="0"></el-option>
									<el-option label="国家水电工程" value="1"></el-option>
									<el-option label="特殊设防类工程" value="2"></el-option>
									<el-option label="严重次生灾害工程" value="3"></el-option>
									<el-option label="省级重大建设工程" value="4"></el-option>
									<el-option label="重要基础设施" value="5"></el-option>
									<el-option label="其他" value="6"></el-option>
								</el-select>
							</el-form-item>
						</el-form-item>
                    </el-col>
                    <el-col :span="9" v-if="supType == '4'">
                        <el-form-item label="单位性质:"  label-width="110px">
							<el-select  v-model="item.syUnitType" placeholder="请选择" ref="syUnitType" disabled>							
								<el-option label="事业" value="事业"></el-option>
								<el-option label="企业" value="企业"></el-option>
							</el-select>
	
							<el-select  v-model="item.qyUnitType" placeholder="请选择" ref="qyUnitType" disabled>
								
							</el-select>
						</el-form-item>
                    </el-col>
                </el-row>
                <!--第二行-->
                <el-row>
                    <!--第一列-->
                    <el-col :span="10" v-if="supType == '0' || supType == '1' || supType == '2'  || supType == '3'">
                        <el-form-item label="项目地址:" v-model="item.recordProjectAddress" :prop="'supervisionChildren.'+index+'.recordProjectAddress'" :rules="rules.recordProjectAddress"
                                      label-width="110px">
	                        <span v-for="(items,indexs) in item.recordProjectAddress">
	                            <el-select v-model="items.provinceValue" placeholder="请选择省" @change="chooseProvince"
	                                       style="width: 150px;" disabled>
	                                <el-option
	                                        v-for="item in provinceData"
	                                        :key="item.code"
	                                        :label="item.name"
	                                        :value="item.name">
	                                </el-option>
	                            </el-select>
	                            <span style="color: #C0CCDA;;">—</span>
	                            <el-select v-model="items.cityValue" placeholder="请选择市" @change="chooseCity"
	                                       style="width: 150px;" disabled>
	                                <el-option
	                                        v-for="item in cityData"
	                                        :key="item.code"
	                                        :label="item.name"
	                                        :value="item.name">
	                                </el-option>
	                            </el-select>
	                            <span style="color: #C0CCDA;;">—</span>
	                            <el-select v-model="items.areaValue" @change="chooseArea" placeholder="请选择区、县"
	                                       style="width: 150px;" disabled>
	                                <el-option
	                                        v-for="item in areaData"
	                                        :key="item.code"
	                                        :label="item.name"
	                                        :value="item.name">
	                                </el-option>
	                            </el-select>
	                        </span>
                        </el-form-item>
                        
                    </el-col>
                    <el-col :span="10" v-if="supType == '4'">
                        <el-form-item label="注册地址:"  :prop="'supervisionChildren.'+index+'.recordProjectAddress'" :rules="rules.recordProjectAddress" label-width="110px">
	                        <el-input v-model="item.recordProjectAddress" placeholder="" style="width: 500px;" disabled></el-input>
                        </el-form-item>	                        
                    </el-col>
                    <el-col :span="10" v-show="supType == '5' || supType == '6'">
                        <el-form-item label="项目地址:" v-model="item.recordProjectAddress" :prop="'supervisionChildren.'+index+'.recordProjectAddress'" :rules="rules.recordProjectAddress"
                                      label-width="110px">
                            <span v-for="(items,indexs) in item.recordProjectAddress">
	                            <el-select v-model="items.provinceValue" placeholder="请选择省" @change="chooseProvince"
	                                       style="width: 150px;" disabled>
	                                <el-option
	                                        v-for="item in provinceData"
	                                        :key="item.code"
	                                        :label="item.name"
	                                        :value="item.name">
	                                </el-option>
	                            </el-select>
	                            <span style="color: #C0CCDA;;">—</span>
	                            <el-select v-model="items.cityValue" placeholder="请选择市" @change="chooseCity"
	                                       style="width: 150px;" disabled>
	                                <el-option
	                                        v-for="item in cityData"
	                                        :key="item.code"
	                                        :label="item.name"
	                                        :value="item.name">
	                                </el-option>
	                            </el-select>
	                            <span style="color: #C0CCDA;;">—</span>
	                            <el-select v-model="items.areaValue" @change="chooseArea" placeholder="请选择区、县"
	                                       style="width: 150px;" disabled>
	                                <el-option
	                                        v-for="item in areaData"
	                                        :key="item.code"
	                                        :label="item.name"
	                                        :value="item.name">
	                                </el-option>
	                            </el-select>
                            </span>
                        </el-form-item>
                	</el-col>
                	<el-col :span="9">
		                <el-form-item label="监管类别:" prop="supervision.suType" label-width="110px">
		                    <el-select v-model="viewcommonproject.supervision.suType" placeholder="请选择监管类别" style="width: 300px;" @change="chooseSutype" disabled>
		                        <el-option label="安评工作成果落实(全覆盖监管)" value="3"></el-option>
		                        <el-option label="安评工作成果落实(随机监管)" value="2"></el-option>
		                        <el-option label="区域地震安全性评估成果落实" value="0"></el-option>
		                        <el-option label="地震小区划工作成果落实" value="1"></el-option>
		                        <el-option label="对安评单位的监管" value="4"></el-option>
		                        <el-option label="设防强制性标准的落实" value="5"></el-option>
		                        <el-option label="行政执法行为监管结果落实" value="6"></el-option>
		                    </el-select>
		                </el-form-item>
		            </el-col>	                 
                </el-row>
                <el-row>
                    <el-col :span="10">
                        <el-form-item label="监管日期:" :prop="'supervisionChildren.'+index+'.suTime'" :rules="rules.suTime" label-width="110px">
                            <el-date-picker
                            		disabled
                            		type="date"
                                    v-model="item.suTime"	                                    
                                    value-format="yyyy-MM-dd"
                                    placeholder="选择监管日期">
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                    <el-col :span="9">
                        <el-form-item label="监管结果:" :prop="'supervisionChildren.'+index+'.suResult'" :rules="rules.suResult" label-width="110px">
                            <el-select v-model="item.suResult" placeholder="请选择监管结果" style="width: 300px;" disabled>
                                <el-option label="符合要求" value="0"></el-option>
                                <el-option label="责令整改" value="1"></el-option>
                                <el-option label="处罚" value="2"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="监管情况说明:" :prop="'supervisionChildren.'+index+'.suExplain'" :rules="rules.suExplain" label-width="110px">
                            <el-input
                            		disabled
                                    type="textarea"
                                    :autosize="{ minRows: 8, maxRows: 8}"
                                    placeholder=""
                                    v-model="item.suExplain">
                            </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
            </div>

            <!--项目填报信息-->
            <el-row>
                <el-col :span="4" class="tab-title">
                    项目填报信息
                </el-col>
            </el-row>
            <el-row>
            	<el-col :span="8">
                    <el-form-item label="监管工作名称:" prop="supervision.projectName" :rules="rules.projectName" label-width="110px">
                        <el-input v-model="viewcommonproject.supervision.projectName" placeholder="请输入监管工作名称" disabled></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="5">
                    <el-form-item label="填报日期:" prop="supervision.suCreateTime" :rules="rules.suCreateTime" label-width="110px">
                        <el-date-picker
                        		disabled
                                v-model="viewcommonproject.supervision.suCreateTime"
                                type="date"
                                value-format="yyyy-MM-dd"
                                placeholder="选择填报日期">
                        </el-date-picker>
                    </el-form-item>
                </el-col>
                <el-col :span="5">
                    <el-form-item label="填报人员:" prop="supervision.suCreateUser" :rules="rules.suCreateUser" label-width="110px">
                        <el-input v-model="viewcommonproject.supervision.suCreateUser" placeholder="请输入填报人员" disabled></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="6">
                    <el-form-item label="填报部门:" prop="supervision.suCreateDepartment" :rules="rules.suCreateDepartment" label-width="110px">
                        <el-input v-model="viewcommonproject.supervision.suCreateDepartment" placeholder="请输入填报部门" disabled></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-form-item label="备注:" prop="" label-width="110px">
                        <el-input
                        		disabled
                                type="textarea"
                                :autosize="{ minRows: 8, maxRows: 8}"
                                placeholder=""
                                v-model="viewcommonproject.supervision.suRemark">
                        </el-input>
                    </el-form-item>
                </el-col>
            </el-row>

            <!--审定信息：审定状态为2：审定未过 、3：审定通过 时展示审定信息-->
            <div v-if="viewcommonproject.supervision.checkStatus==2 || viewcommonproject.supervision.checkStatus==3">
                <el-row>
                    <el-col :span="4" class="tab-title" disabled>审定信息</el-col>
                </el-row>
                <el-row>
                    <el-col :span="6">
                        <el-form-item label="审定人员:" prop="supervision.checkUser" label-width="110px">
                            <el-input v-model="viewcommonproject.supervision.checkUser" placeholder="" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6">
                        <el-form-item label="审定人员机构:" prop="supervision.checkOrg">
                            <el-input v-model="viewcommonproject.supervision.checkOrg" placeholder="" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6">
                        <el-form-item label="审定结果:" prop="supervision.checkResult" label-width="110px">
                            <el-select v-model="viewcommonproject.supervision.checkResult" placeholder="请选择" disabled>
                                <el-option label="不同意" value="0"></el-option>
                                <el-option label="同意" value="1"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="审定意见:" prop="supervision.checkView" label-width="110px">
                            <el-input
                                    disabled
                                    type="textarea"
                                    :autosize="{ minRows: 8, maxRows: 8}"
                                    placeholder="请输入内容"
                                    v-model="viewcommonproject.supervision.checkView">
                            </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
            </div>

            <!-- 操作按钮-->
            <el-row>
                <el-col :span="22">
                    <div style="float:right;">
                        <el-button type="info" size="small" style="width: 60px;height: 30px;"
                                   @click="viewCancel()">关闭
                        </el-button>
                    </div>
                </el-col>
            </el-row>
        </el-form>
    </div>


</div>
<script>
    var vm = new Vue({
        el: '#app',
        data() {
            return {
                linkId: '', //项目ID
                linkStatus: '', //状态码
                // 地区三级联动参数
                provinceValue: '',
                cityValue: '',
                areaValue: '',
                provinceData: [],
                cityData: [],
                areaData: [],
                // 用户登录信息
                userName: '', // 用户登录名称
                orgName: '', // 组织名称对应项目地址
                supType:'',
                viewcommonproject: {
                    supervisionChildren:[],
                	supervision:{
                		suType:'',
                		suCreateTime: '',
	                    suCreateUser: '',
	                    // 填报部门
	                    projectName:'',
	                    suCreateDepartment: '',
	                    suRemark: '',
	                    checkUser: '',
	                    checkOrg: '',
	                    // 审定结果：0同意，1不同意
	                    checkResult: '',
	                    checkView: '',
	                    // 上报状态
	                    reportStatus: '',
	                    orgLevel: '' // 组织等级,新增时设置组织等级
                	}
                },
                checkcommonproject: {
                    supervisionChildren:[],
                	supervision:{
                		suType:'',
                		suCreateTime: '',
	                    suCreateUser: '',
	                    // 填报部门
	                    projectName:'',
	                    suCreateDepartment: '',
	                    suRemark: '',
	                    checkUser: '',
	                    checkOrg: '',
	                    // 审定结果：0同意，1不同意
	                    checkResult: '',
	                    checkView: '',
	                    // 上报状态
	                    reportStatus: '',
	                    orgLevel: '' // 组织等级,新增时设置组织等级
                	}
                },
                rules: {
                    projectName: [{
                        required: true,
                        message: '请输入项目名称',
                        trigger: 'blur'
                    }],
                    projectType: [{
                        required: true,
                        message: '请输入项目类型',
                        trigger: 'blur'
                    }],
                    projectAddress: [{
                        required: true,
                        message: '请输入项目地址',
                        trigger: 'blur'
                    }],
                    suType: [{
                        required: true,
                        message: '监管类型',
                        trigger: 'blur'
                    }],
                    suTime: [{
                        required: true,
                        message: '监管时间',
                        trigger: 'blur'
                    }],
                    suResult: [{
                        required: true,
                        message: '监管结果：符合要求、责令整改、处罚',
                        trigger: 'blur'
                    }],
                    suExplain: [{
                        required: true,
                        message: '监管情况',
                        trigger: 'blur'
                    }],
                    suCreateTime: [{
                        required: true,
                        message: '监管创建时间',
                        trigger: 'blur'
                    }],
                    suCreateUser: [{
                        required: true,
                        message: '监管创建用户',
                        trigger: 'blur'
                    }],
                    suCreateDepartment: [{
                        required: true,
                        message: '监管创建的部门',
                        trigger: 'blur'
                    }],
                    suRemark: [{
                        required: true,
                        message: '监管备注',
                        trigger: 'blur'
                    }],
                    checkUser: [{
                        required: true,
                        message: '请输入审定人员',
                        trigger: 'blur'
                    }],
                    checkOrg: [{
                        required: true,
                        message: '请输入审定人员机构',
                        trigger: 'blur'
                    }],
                    checkResult: [{
                        required: true,
                        message: '请输入审定结果',
                        trigger: 'blur'
                    }],
                    checkView: [{
                        required: true,
                        message: '请输入审定意见',
                        trigger: 'blur'
                    }],
                    checkStatus: [{
                        required: true,
                        message: '请输入审定结果',
                        trigger: 'blur'
                    }],
                    reportStatus: [{
                        required: true,
                        message: '上报状态',
                        trigger: 'blur'
                    }]
                },
            }
        },
        created() {
            // 地址Json树导入
            axios.get('../../json/ChinaCity.json').then(res => {
                this.provinceData = res.data;
            }).catch(e => {
                this.$message.error("网络连接超时");
            });
            // 获取登录用户信息
            var userInfo = JSON.parse(localStorage.getItem('userInfo'));
            // 中国地震局 ==> 中国, 山东省-济南市地震局 ==> 山东省-济南市
            this.orgName = userInfo.orgName.replace("地震局", "");
            this.userName = userInfo.loginName;
            console.log("用户名：" + this.userName);
            console.log("组织名称：" + this.orgName);
        },
        mounted() {
            console.log(window.location.href);
            var url = window.location.href;
            this.linkId = url.split("?")[1].split("=")[1];
            console.log(this.linkId)
            this.getData();
        },
        updated: function () {
            console.log(window.location.href);
            var url = window.location.href;
            var linkid = url.split("?")[1].split("=")[1];
            console.log(linkid);
        },
        methods: {
            getData() {
                axios({
                    method: 'get',
                    url: '/dzjap/supervision/getSupervisionList',
                    params: {
                        Id: this.linkId
                    }
                })
                    .then(response => {
                        console.log(response);                       
                        console.log(response.data.data);
                        if (response.data.code == 200) {
                        	// 审定状态
	                        this.linkStatus = response.data.data.supervision.checkStatus;
                        	this.supType = response.data.data.supervision.suType;
                        	console.log(this.supType)
                            if(response.data.data.supervision.checkStatus == '1'){
                            	this.checkcommonproject = response.data.data;
	                            // 设置用户信息默认值
		                        this.checkcommonproject.supervision.checkUser = this.userName;
		            			this.checkcommonproject.supervision.checkOrg = this.orgName + '地震局';
		            			if(this.supType != '4'){
		            				for(let i = 0;i < this.checkcommonproject.supervisionChildren.length;i++){
			                        	var proAddress = this.checkcommonproject.supervisionChildren[i].recordProjectAddress.split(",");
			                        	console.log(proAddress);
			                        	this.checkcommonproject.supervisionChildren[i].recordProjectAddress = [];
			                        	for(let j = 0;j < proAddress.length;j++){                       		
				                        		this.checkcommonproject.supervisionChildren[i].recordProjectAddress.push({
				                        		provinceValue:proAddress[j].split("-")[0],
								                cityValue:proAddress[j].split("-")[1],
								                areaValue:proAddress[j].split("-")[2]
				                        	})                        	
			                        	}
			                        }
		            			}                        	                       
                            }else{
                            	this.viewcommonproject = response.data.data;
		                        if(this.supType != '4'){
			                        for(let i = 0;i < this.viewcommonproject.supervisionChildren.length;i++){
			                        	var proAddress = this.viewcommonproject.supervisionChildren[i].recordProjectAddress.split(",");
			                        	console.log(proAddress);
			                        	this.viewcommonproject.supervisionChildren[i].recordProjectAddress = [];
			                        	for(let j = 0;j < proAddress.length;j++){                       		
				                        		this.viewcommonproject.supervisionChildren[i].recordProjectAddress.push({
				                        		provinceValue:proAddress[j].split("-")[0],
								                cityValue:proAddress[j].split("-")[1],
								                areaValue:proAddress[j].split("-")[2]
				                        	})                        	
			                        	}
			                        }
			                    }
		                        
                            }
	                        
                        } else {
                            this.$message.error(response.data.msg);
                        }
                    })
                    .catch(function (error) {
                        console.log(error);
                    });
            },
            resetForm(formName) {
                this.$refs[formName].resetFields();
            },
            // 审定提交
            checkonSubmit(formName) {
                console.log(this.checkcommonproject);
                this.$refs[formName].validate((valid) => {
                    if (valid) {
						
                    	if(this.supType !='4' && this.supType !='5'&& this.supType !='6'){
                    		for(let i = 0;i < this.checkcommonproject.supervisionChildren.length;i++){
		                    var projectAddress = this.checkcommonproject.supervisionChildren[i].recordProjectAddress;
		                    var address = '';
			                    for (let j = 0; j < projectAddress.length; j++) {
			                        address +=  projectAddress[j].provinceValue + '-' + projectAddress[j].cityValue + '-' + projectAddress[j].areaValue;
			                        if (j < projectAddress.length-1) {
			                            address += ',';
			                        }
			                    }
			                    this.checkcommonproject.supervisionChildren[i].recordProjectAddress = address;
			                }
                    	}
		                axios({
		                    method: 'post',
		                    url: '/dzjap/supervision/check',
		                    // data中必须有suId
		                    data: this.checkcommonproject
		                }).then((res) => {
		                    console.log(res);
		                    this.getData();
		                    if (res.data.code == 200) {
		                        // 提交成功将要执行的代码
		                        this.$message({
		                            message: '审定成功',
		                            type: 'success'
		                        });
		                        this.checkCancel();
		                    }
		                });
		            } else {
                        this.$message({
                            message: 'error!',
                            type: 'error'
                        });
                        return false;
                    }
                });
            },
            // 调用父页面方法关闭弹窗
            editCancel() {
                parent.vm.superCancel();
            },
            // 调用父页面方法关闭弹窗
            checkCancel() {
                parent.vm.superCancel();
            },
            viewCancel() {
                parent.vm.superCancel();
            },
            handleChange(file, fileList) {
                this.fileList = fileList.slice(-3);
            }
        }

    })
</script>
</body>
</html>